package com.huatai.saas.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @program: nanming-saas
 * @description: 工单表
 * @author: zcw
 * @create: 2024-04-10 14:50
 */
@TableName("working_order")
@ApiModel(value = "工单管理实体", description = "工单管理实体")
@Data
@Accessors(chain = true)
public class WorkingOrderEntity implements Serializable {

	private static final long serialVersionUID = -8629204565837216884L;

	/**
	 * 工单主键id
	 */
	@TableId
	@ApiModelProperty("工单主键id")
	private Long id;
	/**
	 * 工单编号
	 */
	@TableField("order_number")
	@ApiModelProperty(value = "工单编号", required = true)
	@NotBlank(message = "工单编号不能为空")
	private String orderNumber;
	/**
	 * 用户名称
	 */
	@TableField("user_name")
	@ApiModelProperty(value = "用户名称", required = true)
	private String userName;
	/**
	 * 用户id
	 */
	@TableField("user_id")
	@ApiModelProperty(value = "用户id", required = true)
	private Long userId;
	/**
	 * 父级id
	 */
	@TableField("parent_id")
	@ApiModelProperty(value = "父级id")
	private Long parentId;
	/**
	 * 子类id
	 */
	@TableField("child_id")
	@ApiModelProperty(value = "子类id")
	@NotNull(message = "请选择底板或场景名称")
	private Long childId;
	/**
	 * 底板或场景名称
	 */
	@TableField("child_name")
	@ApiModelProperty(value = "底板或场景名称")
	@NotBlank(message = "请选择底板或场景名称")
	private String childName;
	/**
	 * 工单问题描述
	 */
	@TableField("description")
	@ApiModelProperty(value = "工单问题描述", required = true)
	@NotBlank(message = "问题描述不能为空")
	private String description;
	/**
	 * 用户联系电话
	 */
	@TableField("phone")
	@ApiModelProperty(value = "联系电话", required = true)
	@NotBlank(message = "联系方式不能为空")
	private String phone;
	/**
	 * 工单状态
	 */
	@TableField("order_status")
	@ApiModelProperty(value = "工单状态", required = true)
	private Integer orderStatus;
	/**
	 * 处理结果
	 */
	@TableField("result")
	@ApiModelProperty(value = "工单处理结果")
	private String result;
	/**
	 * 处理人的账号
	 */
	@TableField("account")
	@ApiModelProperty(value = "处理人的账号")
	private String account;
	/**
	 * 处理人的名字
	 */
	@TableField("process_name")
	@ApiModelProperty(value = "处理人的名字")
	private String processName;
	/**
	 * 工单排序序号
	 */
	@TableField("sort")
	@ApiModelProperty(value = "工单排序序号", required = true)
	private Integer sort;
	/**
	 * 工单创建时间
	 */
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	@ApiModelProperty("工单创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime createTime;
	/**
	 * 工单修改时间
	 */
	@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty("工单修改时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime updateTime;
}
